package com.hoshiicloud.stock.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.stock.feign.hystrix.HystrixVendorFeignFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 供应商微服务FeignClient
 *
 * @author : yangcheng
 * @date : 2019/5/20 09:37
 * @mail : maiboyc@163.com
 **/
@FeignClient(name = "hoshiicloud-organization", fallback = HystrixVendorFeignFallback.class)
public interface VendorFeignService {

    /**
     * 根据id获取租户供应商信息
     * @param id 租户ID
     * @return Response
     */
    @RequestMapping(value = "/com-organization/{id}", method = RequestMethod.GET)
    Response getComVendorById(@PathVariable("id") Long id);

    /**
     * 根据id获取平台供应商信息
     * @param id 平台ID
     * @return Response
     */
    @RequestMapping(value = "/plat-organization/{id}", method = RequestMethod.GET)
    Response getPlatVendorById(@PathVariable("id") Long id);


    /**
     * 根据id获取店铺供应商信息
     * @param id 店铺ID
     * @return Response
     */
    @RequestMapping(value = "/store-organization/{id}", method = RequestMethod.GET)
    Response getStoreVendorById(@PathVariable("id") Long id);

}
